﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using WPF.Controls.QuerySelector;
namespace XWord.WPF.ApplicationFramework.TestModules.validationsimple
{
    /// <summary>
    /// Interaction logic for ValidationLifeCycleSimple.xaml
    /// </summary>
    public partial class ValidationLifeCycleSimple : UserControl
    {
        public ValidationLifeCycleSimple()
        {
            InitializeComponent();
            button1.one1(Button.ClickEvent, new Action(() => { MessageBox.Show("xx"); }));
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            var panel = new StackPanel();
            var button = new Button();
            panel.Children.Add(button);
            var a = VisualTreeHelper.GetChild(VisualTreeHelper.GetParent(button), 0);
            (a as Button).Content = "1";
           
        }
    }
}
